/* ***********************************************************************
 * Copyright (C) 1992-- 2016 中国南方航空股份有限公司.
 *
 * Created [2016-09-08 14:54:49] by FMS Team
 * ***********************************************************************
 *
 * mybaits-generator
 * ***********************************************************************
 */
package com.foreveross.law.system.domain;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
* <p>com.foreveross.law.system.domain.RoleUser</p>
*
* @author changwu.liao email:changwu.liao(a)gmail.com
* @version 1.0
* @since 1.0
* @Modified by add modified description
* @purpose add this file description here
*/
public class RoleUser implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias	
	public static final String TABLE_SQL_NAME = "ROLE_USER";
	
	public static final String ALIAS_ROLE_USER_ID = "roleUserId";
	public static final String ALIAS_ROLE_ID = "roleId";
	public static final String ALIAS_USER_ID = "userId";
	public static final String ALIAS_CREATE_DATE = "createDate";
	public static final String ALIAS_CREATE_BY = "createBy";
	
	//the column is a primary key	
	public static final String PROP_KEY = "roleUserId";
	
	//fields START
	public static String PROP_REF="RoleUser";
	public static String PROP_REF_ROLE_USER_ID = "roleUserId";
	
	public static String PROP_REF_ROLE_ID = "roleId";
	
	public static String PROP_REF_USER_ID = "userId";
	
	public static String PROP_REF_CREATE_DATE_BEGIN = "createDateBegin";
	public static String PROP_REF_CREATE_DATE_END = "createDateEnd";
	
	public static String PROP_REF_CREATE_BY = "createBy";
	
	//fields END
	
	//columns sql name START	
	public static String PROP_COLUMN_ROLE_USER_ID = "ROLE_USER_ID";
	public static String PROP_COLUMN_ROLE_ID = "ROLE_ID";
	public static String PROP_COLUMN_USER_ID = "USER_ID";
	public static String PROP_COLUMN_CREATE_DATE = "CREATE_DATE";
	public static String PROP_COLUMN_CREATE_BY = "CREATE_BY";
	//columns sql name END
		
	//columns START
	private java.lang.String roleUserId;
	private java.lang.String roleId;
	private java.lang.String userId;
	private java.util.Date createDate;
	private java.lang.String createBy;
	//columns END

	public RoleUser(){
	}

	public RoleUser(
		java.lang.String roleUserId
	){
		this.roleUserId = roleUserId;
	}

	public void setRoleUserId(java.lang.String value) {
		this.roleUserId = value;
	}
	
	public java.lang.String getRoleUserId() {
		return this.roleUserId;
	}
	public void setRoleId(java.lang.String value) {
		this.roleId = value;
	}
	
	public java.lang.String getRoleId() {
		return this.roleId;
	}
	public void setUserId(java.lang.String value) {
		this.userId = value;
	}
	
	public java.lang.String getUserId() {
		return this.userId;
	}
	
	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}
	
	public java.util.Date getCreateDate() {
		return this.createDate;
	}
	public void setCreateBy(java.lang.String value) {
		this.createBy = value;
	}
	
	public java.lang.String getCreateBy() {
		return this.createBy;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("RoleUserId",getRoleUserId())
			.append("RoleId",getRoleId())
			.append("UserId",getUserId())
			.append("CreateDate",getCreateDate())
			.append("CreateBy",getCreateBy())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getRoleUserId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof RoleUser == false) return false;
		if(this == obj) return true;
		RoleUser other = (RoleUser)obj;
		return new EqualsBuilder()
			.append(getRoleUserId(),other.getRoleUserId())
			.isEquals();
	}
}

